The present invention relates generally to the field of shared databases, and more particularly to multi-tenant applications on a shared database in a cloud environment.
Provisioning common resources in the database layer to support multiple tenants is a common problem which software-as-a-service (SaaS) vendors face with the proliferation of cloud environments. One model that has emerged to address this problem is sharing the same database instance for multiple tenants. In that way, costs are lowered. There are two state of the art variations that follow this model. They are: (i) multiple tenants share the same tables with a mechanism to identify the rows belonging to each tenant (for example, a tenant identifier (ID) is used as a column in the database table and each SQL (structured query language) query includes a tenant ID to filter out the rows corresponding to a particular tenant); and (ii) each tenant has its own dedicated database table with a mechanism to identify the tables belonging to each tenant (for example, a different schema is used for each tenant so that each tenant has a different database table and each tenant uses their schema in SQL queries to redirect the queries to their tables).